package org.summer.generator.writer;

import org.summer.generator.channel.FileWriterChannel;
import org.summer.generator.config.ProjectConfig;
import org.summer.generator.config.WriterConfig;
import org.summer.generator.vo.Table;

/**
 * 文件写入接口实现类抽象父类，实现公共操作
 */
public abstract class AbstractFileWriter implements FileWriter {
    /**
     * 文件写入通道
     */
    protected FileWriterChannel channel;
    /**
     * 项目配置信息
     */
    private ProjectConfig project;
    /**
     * 文件写入操作配置信息
     */
    private WriterConfig writer;
    /**
     * 数据库表信息实体
     */
    private Table table;
    @Override
    public void setChannel(FileWriterChannel channel) {
        this.channel = channel;
    }

    @Override
    public void setProjectConfig(ProjectConfig config) {
        this.project = config;
    }

    @Override
    public void setWriterConfig(WriterConfig config) {
        this.writer = config;
    }

    @Override
    public void setTable(Table table) {
        this.table = table;
    }
}
